<template>
  <div class="container">
    <div class="inner">
      <div class="imgBox">
        <img src="../../assets/img/dashboardWMS.png" alt="" v-if="$store.getters.routerType === 'WMS'">
        <img src="../../assets/img/dashboardERP.png" alt="" v-else>
      </div>
    </div>
  </div>
</template>

<script>
import { getLodop } from '@/utils/LodopFuncs'
export default {
  name: 'Dashboard',
  data() {
    return {
      options: [], // 默认为options的前10个
      value: ''
    }
  },
  mounted() {
  },
  beforeDestroy() {
  },
  methods: {
    getLodop() {
      const LODOP = getLodop()
      var strHTML = document.getElementsByTagName('html')[0].innerHTML
      LODOP.PRINT_INITA(1, 1, 770, 660, '测试预览功能')
      LODOP.ADD_PRINT_TEXT(10, 60, 300, 200, '这是测试的纯文本，下面是超文本:')
      LODOP.ADD_PRINT_HTM(30, 5, '100%', '80%', strHTML)
      LODOP.PREVIEW()
    },
    btnSend() {
    },
    filterMethod(query) { // query是输入的关键字
      const options = []; for (let i = 1; i < 5000; i++)options.push({ label: 'Test' + i })
      if (query === '') { this.options = options.slice(0, 10) } else {
        const result = [] // 存储符合条件的下拉选项
        options.forEach(val => {
          if (val.label.indexOf(query) !== -1) result.push(val)
        })
        this.options = result.slice(0, 10) // 只取前10个
      }
    },
    getIcon() {
      this.$router.push({
        path: '/system/iconHtml'
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  padding: 10px;
  background-color: #EAEDFF;
  height: 100%;

  .inner {
    width: 100%;
    height: 100%;
    background-color: #EAEDFF;
    display: flex;
    justify-content: center;
    align-items: center;

    .imgBox {
      width: 4.2292rem;
      height: 3.125rem;

      img {
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>
